import Vue from 'vue'
import App from './App.vue'
/* import the Element-UI   */
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import router from './router'
import store from './store/index.js'
import VueStorage from 'vue-ls';
import keepScrollMixin from './mixins/keepScroll'
import _ from 'lodash';
import moment from 'moment';
import FileSaver from 'file-saver';
import XLSX from 'xlsx';
import Print from 'vue-print-nb'
import { Base64 } from 'js-base64'
import VXETable from 'vxe-table'
import 'vxe-table/lib/style.css'



import { VueAxios } from './utils/request';

//mock
import './mock';

import './permission';

import '@/icons';

Vue.use(keepScrollMixin, {
  scroller: '#app-main-scroller'
})
//引入全局moment
Vue.prototype.$moment = moment;
//VUE中导出excel表格模板
Vue.prototype.$FileSaver = FileSaver;
Vue.prototype.$XLSX = XLSX;
Vue.prototype.$Base64 = Base64;


const sessionStorageOptions = {
  namespace: 'pross__', // key prefix
  name: 'ss', // name variable Vue.[ss] or this.[$ss],
  storage: 'session' // storage name session, local, memory
};

const localStorageOptions = {
  namespace: 'prolocal__', // key prefix__', // key prefix
  name: 'ls', // name variable Vue.[ls] or this.[$ls],
  storage: 'local' // storage name session, local, memory
};


Vue.use(ElementUI);
Vue.use(VueAxios);
Vue.use(_.clone(VueStorage), sessionStorageOptions);
Vue.use(_.clone(VueStorage), localStorageOptions);
Vue.use(Print);
Vue.use(Base64);
Vue.use(VXETable);
Vue.config.productionTip = false;

new Vue({
  el: '#app',
  router,
  store,
  render: (h) => h(App),
}).$mount("#app");
